import Mock from 'mockjs'
import {doCustomTimes} from '@/libs/util'

export const listUser = req => {
  let tableData = []
  doCustomTimes(100, () => {
    tableData.push(Mock.mock({
      'id|999-9999': 999,
      username: '@First',
      'phoneNumber|13012341234-13912341234': 13012341234,
      remark: '-',
      createdDate: '@date("yyyy-MM-dd HH:mm:ss")'
    }))
  })
  return {
    code: 200,
    data: tableData,
    message: 'success'
  }
}

export const removeUser = req => {
  return {
    code: 200,
    data: null,
    message: 'success'
  }
}

export const updateRemark = req => {
  return {
    code: 200,
    data: null,
    message: 'success'
  }
}

export const updateUser = req => {
  return {
    code: 200,
    data: null,
    message: 'success'
  }
}

export const addUser = req => {
  return {
    code: 200,
    data: null,
    message: 'success'
  }
}
